import Vue from 'vue'
import Router from 'vue-router'
//ebook入口组件
// import Ebook from './views/ebook/index.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      // 重定向到 /ebook 
      redirect: '/ebook'
    },
    {
      path: '/ebook',
      component: () => import('./views/ebook/index.vue'),
      // 设置动态路由
      children: [
        {
          path : ':fileName',
          component : () => import('./components/ebook/EbookReader.vue')
        }
      ]
    }
  ]
})
